package com.llf.Service;

import com.llf.Mapper.BillMapper;
import com.llf.Pojo.Bill;
import com.llf.Pojo.Provider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
@Service
public class BillServiceImpl  implements BillService{
    @Autowired
     private BillMapper billMapper;
    @Override
    public int getBillCountByProviderId(Integer providerId) {
        return billMapper.getBillCountByProviderId(providerId);
    }

    @Override
    public int addBill(Bill bill) {
        return billMapper.addBill(bill);
    }

    @Override
    public List<Bill> getBillList(String productName, Integer providerId, Integer isPayment) {
        return billMapper.getBillList(productName,providerId,isPayment);
    }


    @Override
    public int getBillCount(Bill bill) {
        return billMapper.getBillCount(bill);
    }


    @Override
    public int deleteBillById(Integer id) {
        return billMapper.deleteBillById(id);
    }

    @Override
    public Bill getBillById(Integer id) {
        return billMapper.getBillById(id);
    }

    @Override
    public int updateBill(Bill bill) {
        return billMapper.updateBill(bill);
    }

    @Override
    public int deleteBillByProviderId(Integer providerId) {
        return billMapper.deleteBillByProviderId(providerId);
    }


}
